<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
    <h:head>
        <title>HomePage</title>
    </h:head>
    <h:body>
        <p:layout fullPage="true">
            <p:layoutUnit position="north" size="130" style="border: 0px">
                <h:panelGrid columns="4" style="width: 100%">
                    <h:graphicImage value="/images/Simbolo_Meteocal.png" height="100"></h:graphicImage>
                    <h1>Welcome back <h:outputLabel value="#{homeBean.getName()}"/></h1>
                    
                </h:panelGrid>
            </p:layoutUnit> 
            <p:layoutUnit position="center">
                <h:form>
                    <p:schedule id="schedule" value="#{scheduleView.eventModel}" widgetVar="myschedule" timeZone="GMT+2">
                        <p:ajax event="eventSelect" listener="#{scheduleView.onEventSelect}" oncomplete="PF('eventDialog').show();"/>
                    </p:schedule>
                    <p:dialog widgetVar="eventDialog" header="Event Details" showEffect="clip" hideEffect="clip">
                        Do you like to see the data of the event? 
                        <p:button id="seeButton" value="Click here!" outcome="eventdetail" />
                        <br/>
                        Do you like to modify the data of the event? 
                        <p:button id="modifyButton" value="Click here!" outcome="eventcreation" />
                    </p:dialog>
                </h:form>
            </p:layoutUnit>
            <p:layoutUnit position="south" size="60">
                <h:panelGrid columns="4" style="width: 100%">
                    <h:button outcome="eventcreation" value="Create a new Event" />
                    
                    <h:button outcome="contacts" value="Search for a user" />
                    
                    <h:button outcome="notifications" value="Move to your notifications page" />
                    
                    <h:button outcome="index" value="Logout" />
                </h:panelGrid>
            </p:layoutUnit>
        </p:layout>
    </h:body>
</html>





